@if (Request::isXmlHttpRequest())
<table class="table table-bordered table-condensed table-hover">
    <thead style="background-color: #f0f0f0; white-space:nowrap;">
    <tr>
        <th title="Date">日付</th>
        <th title="Auction">オーク会場</th>
        <th title="Auction no">出品番号</th>
        <th title="Car name">車種</th>
        <th title="Car year">年式</th>
        <th title="Car year month">年月</th>
        <th title="Chassis number">車体番号</th>
        <th title="Bill total amount">Bill total amount</th>
        <th title="Bill price">Bill price</th>
    </tr>
    </thead>
    <tbody style="font-size: 11px;">
    @foreach($purchase_car as $car)
    <tr>
        <td>{{ $car->purchase_date }}</td>
        <td>{{ $car->auction_name }}</td>
        <td>{{ $car->lot_no }}</td>
        <td>{{ $car->car_maker }} {{ $car->car_name }}</td>
        <td>{{ $car->car_year }}</td>
        <td>{{ $car->car_year_month }}</td>
        <td>{{ $car->chasis_no }}</td>
        <td style="text-align: right;">{{ $car->bill_total_amount ? number_format($car->bill_total_amount , 0) : 0; }}</td>
        <td style="text-align: right;">{{ $car->bill_price ? number_format($car->bill_price, 0) : 0; }}</td>
    </tr>
    @endforeach
    </tbody>
</table>
@else
@extends('frontend/layouts/bootstrap')
@section('content')
<br> Container Details <h2> @if ($container) @if( $container->settlement_flag)  Settled. @else Settling... @endif {{$container->transport_start_date or ' no transport date'}} @else <h2> There is no container.  @endif </h2> <br> 
@if (count($purchase_car))
<table class="table table-bordered table-condensed table-hover">
    <thead style="background-color: #f0f0f0; white-space:nowrap;">
    <tr>
        <th title="Date">日付</th>
        <th title="Auction">オーク会場</th>
        <th title="Auction no">出品番号</th>
        <th title="Car name">車種</th>
        <th title="Car year">年式</th>
        <th title="Car year month">年月</th>
        <th title="Chassis number">車体番号</th>
        <th title="Bill total amount">Bill total amount</th>
        <th title="Bill price">Bill price</th>
    </tr>
    </thead>
    <tbody style="font-size: 11px;">
    @foreach($purchase_car as $car)
    <tr>
        <td>{{ $car->purchase_date }}</td>
        <td>{{ $car->auction_name }}</td>
        <td> <a href="{{url('car_balance/car')}}/{{$car->id}}/show" target=_car>{{ $car->lot_no }}</a></td>
        <td>{{ $car->car_maker }} {{ $car->car_name }}</td>
        <td>{{ $car->car_year }}</td>
        <td>{{ $car->car_year_month }}</td>
        <td>{{ $car->chasis_no }}</td>
        <td style="text-align: right;">{{ $car->bill_total_amount ? number_format($car->bill_total_amount , 0) : 0; }}</td>
        <td style="text-align: right;">{{ $car->bill_price ? number_format($car->bill_price, 0) : 0; }}</td>
    </tr>
    @endforeach
    </tbody>
</table>
@else
<h2> There is no cars. </h2>
@endif
@stop
@endif

